<#assign hasCustomerId=false/>
<#list columnList as column>
    <#if column.form>
        <#if column.attrName == 'customerId'>
            <#assign hasCustomerId=true/>
        <#else>
        </#if>
    </#if>
</#list>
package ${package}.dto.${classname}.req;

import com.imydao.support.tool.page.req.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

<#list imports as i>
import ${i!};
<#if i?contains("java.time.")>
import java.time.format.DateTimeFormatter;
</#if>
</#list>

/**
 * ${tableComment}查询参数
 *
 * @author ${author} ${email}
 * @since ${version} ${date}
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "${tableComment}")
public class ${ClassName}ListDto extends PageParam {

<#if !hasCustomerId>
	/**
	 * 客户id
	 */
	@Schema(description = "客户id")
	private Long customerId;

</#if>
	/**
	 * 组织id
	 */
	@Schema(description = "组织id")
	private Long orgId;

<#list columnList as column>
<#if column.query>
    <#if column.columnComment!?length gt 0>
    /**
     * ${column.columnComment}
     */
	@Schema(description = "${column.columnComment}")
	</#if>
	<#if column.attrType == "LocalDate">
	private ${column.attrType} ${column.attrName}Start;
	@Schema(description = "${column.columnComment}")
	private ${column.attrType} ${column.attrName}End;
	<#elseif column.attrType == "LocalDateTime">
	private ${column.attrType} ${column.attrName}Start;
	@Schema(description = "${column.columnComment}")
	private ${column.attrType} ${column.attrName}End;
	<#else>
	private ${column.attrType} ${column.attrName};
	</#if>

</#if>
</#list>
<#list columnList as column>
<#if column.query>
	<#if column.attrType == "LocalDate">
	<#if column.columnComment!?length gt 0>
	/**
	 * ${column.columnComment}mapper检索字段
	 */
	</#if>
	public String get${column.attrName?cap_first}StartStr(){
		return this.${column.attrName}Start == null ? null : this.${column.attrName}Start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
	}
	public String get${column.attrName?cap_first}EndStr(){
		return this.${column.attrName}End == null ? null : this.${column.attrName}End.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
	}

	</#if>
	<#if column.attrType == "LocalDateTime">
	<#if column.columnComment!?length gt 0>
	/**
	 * ${column.columnComment}mapper检索字段
	 */
	</#if>
	public String get${column.attrName?cap_first}Str(){
		return this.${column.attrName} == null ? null : this.${column.attrName}.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
	}

	</#if>
</#if>
</#list>
}